﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ReconCaracteres_Backpropagation
{
    public class Neuron
    {
        public double net;
        public Double[] weights;
        public Neuron(int weightsAmount) {

                weights = new Double[weightsAmount];

        }
        public Neuron()//for the output layer which doesnt have weights
        {
         
        }
        public void setNet(double net) { 
            this.net=net;
        }
        public void modifyWeigths(Double[] factoresDeCambio, Double alpha){
            for (int i = 0; i < this.weights.Length; i++ )
            {
                this.weights[i] = this.weights[i] + (alpha * factoresDeCambio[i+1] * this.net);
            }
        }
    }
}
